﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:v="clr-namespace:WPFGlue.Validation" >
    <ControlTemplate x:Key="ValidationTemplate">
        <Border BorderBrush="Red" BorderThickness="1">
            <Border.Visibility>
                <Binding ElementName="placeholder" Path="AdornedElement.IsVisible">
                    <Binding.Converter>
                        <BooleanToVisibilityConverter/>
                    </Binding.Converter>
                </Binding>
            </Border.Visibility>
            <StackPanel>
                <AdornedElementPlaceholder x:Name="placeholder"
             v:Validation.AdornedElementToolTip="{Binding Path=/ErrorContent}"/>
            </StackPanel>
        </Border>
    </ControlTemplate>
</ResourceDictionary>
